package com.zsk.shop.enums;

/**
 * 审核状态 0运营正在审核 1(运营同意)财务正在审核 2已同意 3已驳回
 *
 * @author ljh
 * @create 2021/06/19 10:26
 */
public enum EnumWithdrawStatus {
    ON("审核中", 1),
    SUCCESS("已同意", 2),
    FAIL("提现失败", 3);

    EnumWithdrawStatus(String value, Integer code) {
        this.value = value;
        this.code = code;
    }

    String value;
    Integer code;

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public static String getNameByCode(Integer code) {
        EnumWithdrawStatus[] enums = EnumWithdrawStatus.values();
        for (int i = 0; i < enums.length; i++) {
            if (enums[i].getCode().equals(code)) {
                return enums[i].getValue();
            }
        }
        return "";
    }
}
